package com.aabte.permissionframeworklearn.permission.beans;

import lombok.Data;

import javax.validation.constraints.Min;

/**
 * @author Daniel
 */
@Data
public class PageQuery {

    @Min(value = 1, message = "当前页码不合法")
    private Integer pageNo = 1;
    @Min(value = 1, message = "每页数量不合法")
    private Integer pageSize = 10;
    private Integer offset;

    public Integer getOffset() {
        return (pageNo - 1) * pageSize;
    }
}
